﻿Imports OMANE.Common.UI
Imports Microsoft.Practices.Prism.Commands

''' <summary>
''' View Model de la fenêtre principale
''' </summary>
''' <remarks></remarks>
Friend Class MainWindowViewModel
    Inherits ViewModelBase

    ''' <summary>
    ''' View Model du menu principal
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public ReadOnly Property ViewModelMainMenu As ViewModelMainMenu
        Get
            Return App.Instance.GetService(Of IUIService).ViewModelMainMenu
        End Get
    End Property

    ''' <summary>
    ''' View Model de la tree-view et du tabcontrol
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public ReadOnly Property V2ViewModelAccordeonMenu As V2ViewModelAccordeonMenu
        Get
            Return App.Instance.GetService(Of IUIService).V2ViewModelAccordeonMenu
        End Get
    End Property

    Private _DropFileCommand As New DelegateCommand(Of Object)(AddressOf DropFileExecute, AddressOf DropFileCanExecute)
    Public ReadOnly Property DropFileCommand As DelegateCommand(Of Object)
        Get
            Return _DropFileCommand
        End Get
    End Property
    Private Sub DropFileExecute(ByVal parameter As Object)
        Try
            App.Instance.GetService(Of IUIService).ShowMessage(String.Join(vbCrLf, CType(parameter, String())))
        Catch ex As Exception
            App.Instance.GetService(Of IUIService).ShowMessage(parameter)
        End Try

    End Sub
    Private Function DropFileCanExecute(ByVal parameter As Object) As Boolean
        Return True
    End Function


End Class
